package com.zlx.store.common.constant;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

@ApiModel("API返回对象的代码和信息")
@Getter
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SecurityConstant {
    USER_ROLE_ADMIN(0,"管理员"),
    USER_ROLE_MANAGER(1,"经理"),
    USER_ROLE_CUSTOMER(2,"消费者"),
    USER_ROLE_DELETE(3,"已删除");


    @ApiModelProperty(name = "code", notes = "返回的代码")
    private int code;
    @ApiModelProperty(name = "msg", notes = "返回的代码的简约描述")
    private String msg;

    SecurityConstant(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
